/*
 * GNU GENERAL PUBLIC LICENSE v2
 * 
 * Developers: Alan Audette, Oguz Bastemur
 */
using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;

namespace SqlDatabaseBackup.Configuration
{
    public class Archive : ConfigurationElement
    {
        [ConfigurationProperty("archivefiles")]
        public bool ArchiveFiles
        {
            get 
            {
                bool archiveFiles = false;
                bool.TryParse(this["archivefiles"].ToString(), out archiveFiles);
                return archiveFiles;
            }
        }

        [ConfigurationProperty("filename")]
        public string Filename
        {
            get { return this["filename"] as string; }
        }

        [ConfigurationProperty("deleteFilesOlderThan")]
        public int DeleteFilesOlderThan
        {
            get { return (int)this["deleteFilesOlderThan"]; }
        }  
    }
}
